import React from 'react'
import { BrowserRouter as Router, Route,Redirect,Link,withRouter  } from "react-router-dom";
import {Col, Layout, Row,Input} from 'antd'
import 'antd/dist/antd.css'


const{Search}=Input;

class Top extends React.Component {

 state={
     keywords:""   
     }

    input=(e)=>{
        if(e.keyCode === 13) {
            this.props.history.push({ pathname: "/searches/keywords:"+e.target.value});  
        }
    }

inputchange=()=>{
        console.log("yes")
    }
  
render() {
        const {keywords}=this.state
        return (     
                    <div className="head">
                            <div  className="logo ">
                                    <Link to="/book/alpha">
                                        <img width="173px" src="/logo.png" alt="" />
                                        </Link>
                                 </div>
                                 <div  className="search ">
   
                                 </div>
                            { /*   <div className="search">
                                    <input ref="input"   className="searchinput" onChange={this.inputchange} type="text" onKeyUp={this.input} 
                                             />
                                            <button type="button" >搜索</button>
                                            
        </div> 
                             
                            </Col>
                            <Col span={8} className="top-col">
                               
                               
                            </Col>*/}
                    </div>

        )
    }
}

export default withRouter(Top);
